const {getAllCarsInfor3,getCheckingCars3,getSolidOutCars3,getOneCar3,changeState3,addCarInfor3,getUserCar3} = require('../dao/carsDao');
module.exports.getAllCarsInfor2 = async function(reqData){
    return await getAllCarsInfor3(reqData);
}
module.exports.getCheckingCars2 = async function(reqData){
    const {rentalState} = reqData
    if(rentalState){
        return await getSolidOutCars3(reqData);
    }else{
        return await getCheckingCars3(reqData);
    }
    
}
module.exports.getUserCar2 = async function(ownerid){
    return await getUserCar3(ownerid);
}

module.exports.getOneCar2 = async function(reqData){
    return await getOneCar3(reqData);
}
module.exports.changeState2 = async function(reqData){
    return await changeState3(reqData);
}
module.exports.addCarInfor2 = async function(reqData){
    return await addCarInfor3(reqData);
}
module.exports.searchCars2 = async function(reqData){
    return await searchCars3(reqData);
}